home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / tests / SubClass4.m < prev    next >
Encoding:
Text File  |  1992-08-18  |  917 b   |  59 lines

  1. /* -*-objc-*- */
  2.  
  3. /* 
  4.   $Header$
  5.   $Author: dglattin $
  6.   $Date$
  7.   $Log$
  8.  */
  9.  
  10. #include  <SubClass4.h>
  11. #include  <stdio.h>
  12.  
  13.  
  14. @implementation SubClass4
  15.  
  16.  
  17. + initialize {
  18.  
  19.  
  20.   printf( "If you see this message then SubClass4 received a"
  21.     " +initialize method\n" );
  22.   return self;
  23. }
  24.  
  25. +newOther {
  26.  
  27.  
  28.   return [ super newOther ];
  29. }
  30.  
  31.  
  32. + ( int )return12 { 
  33.  
  34.  
  35.   [ SubClass1 newOther ];   /* Due to compiler design, 
  36.                               this should not be a infinite loop. */
  37.   return [ super return12 ] + 1 ; 
  38. }
  39.  
  40.  
  41. - ( int )return15 { 
  42.  
  43.  
  44.   [ SubClass1 newOther ];   /* Due to compiler design, 
  45.                               this should not be a infinite loop. */
  46.   return [ super return15 ]; 
  47. }
  48. - ( int )return33 { return [ super return33 ] + 1; }
  49. - ( int )return45 { 
  50.  
  51.  
  52.   [ SubClass1 newOther ];   /* Due to compiler design, 
  53.                               this should not be a infinite loop. */
  54.   return 45; 
  55. }
  56.  
  57.  
  58. @end
  59.